forum

home / developersection / forums / how to use object query with a where, and to retrieve entity record, entity framework

How to use object query with a WHERE, AND to retrieve entity record, entity framework

Anonymous User 1967 19-Jan-2015

I am trying to add and AND condition to my entity framework where clause, but the way I am doing it is not working. Can anyone show me how to do this the correct way please? Before adding the AND condition, the code worked fine.

Dim myRecipeStepsHistory = myContext.RefineRecipeStep.Where("it.Recipe_Id=" & strRecipeId And "it.IngredientItemNumber=" & strIngredientNumber).FirstOrDefault()

The error I get reads as:

Conversion from string "it.Recipe_Id=11" to type 'Long' is not valid.

Thank you very much.


Updated on 19-Jan-2015

I am a content writter !


Message
Can you answer this question?

Answer

1 Answers

Liked By